home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_10_01
/
1001110a
< prev
next >
Wrap
Text File
|
1991-11-21
|
2KB
|
79 lines
#
# t.mnu (compiles into t.mnc):
# Top level menu for CMENU test system. To test this menu,
# start in a test directory /u/myname/menu, and
# put the command script "test.sh" into the this directory.
# Then create a subdirectory named "/u/myname/menu/test"
# and put the object file for menu t2 (t2.mnc) in it.
#
menu:
title "The MAIN Menu" # menu title appears at top
escape # allow shell escapes
spacing 2 # double space the entries
item:
"Run test.sh"
help 'next item is "zot"'
action "test.sh" # after the "speed" program runs,
nextitem zot # item "zot" (below) is highlighted
item:
"Run External Menu t2"
path "test" # run menu "t2", found in
emenu "t2" # subdirectory "test".
item:
"run a Unix shell"
action "exec sh" # most efficient with "exec"
item:
"run shell, no exec." # creates an extra process.
action sh # (note: quotes not really needed)
item zot:
'ITEM "Zot": list the directory (in reverse chron. order)'
help 'this is a help line for #2, "ZOT"'
action "ls -t"
prompt # prompt user before continuing
item
text "Do a long directly listing (no prompt)"
help "the next item should ALSO be zot"
action "l"
nextitem zot
item
text "GO TO MENU BAR" # invoke a locally defined menu
lmenu bar
item
text "filler" # clone this entry several times
action "ls" # to see automatic multiple columns
item
text "filler" # clone this entry several times
action "ls" # to see automatic multiple columns
endmenu
menu bar:
title "This is local menu BAR. shell escpaes won't work."
noescape
path "/usr/bin"
item
text "here is the first item of menu BAR"
action "ls"; prompt # semi OK as separator
item
text "here is the next item of menu BAR"
action "ls" prompt # so is a space
item
text "here is the LAST item of the menu BAR (with help)"
help "this is help for the LAST item of menu BAR"
action "ls"
endmenu